package com.sibu.yx.promotion.service;

import com.doubo.common.model.response.CommonResponse;
import com.sibu.yx.promotion.common.enums.AliYunSmsTemplateEnum;
import com.sibu.yx.promotion.common.enums.RedisKey;

/**
 * 短信发送
 * @author suzheng
 * @date 2021/7/7
 */
public interface SmsService {


    /**
     * 发送验证码
     *
     * @param phone
     * @param redisKey
     * @param aliyunSmsTemplateEnum
     * @return
     */
    CommonResponse<String> sendSmsVerifyWithParam(String phone, RedisKey redisKey, AliYunSmsTemplateEnum aliyunSmsTemplateEnum,String param);
    /**
     * 发送验证码
     *
     * @param phone
     * @param redisKey
     * @param aliyunSmsTemplateEnum
     * @return
     */
    CommonResponse<String> sendSmsVerify(String phone, RedisKey redisKey, AliYunSmsTemplateEnum aliyunSmsTemplateEnum);

    /**
     * 发送短信
     *
     * @param phone
     * @param aliyunSmsTemplateEnum
     * @return
     */
    CommonResponse<String> sendSms(String phone, AliYunSmsTemplateEnum aliyunSmsTemplateEnum, String... param);


    boolean checkSms(String phone, String smsVerify, RedisKey redisKey);

    String getSmsCode(String phone, RedisKey redisKey);
}
